package com.anlogic.sdk.app.handlers;

import org.eclipse.core.runtime.IProgressMonitor;
import com.anlogic.sdk.app.model.ApplicationModel;

public class NewApplicationProjectHandler {
	private ApplicationModel model;
	
	public static NewApplicationProjectHandler newInstance(ApplicationModel model) {
		NewApplicationProjectHandler handler = new NewApplicationProjectHandler();
		handler.model = model;
		return handler;
	}
	
	public void run(IProgressMonitor monitor) {
		createProject(this.model, monitor);
	}
	
	private void createProject(ApplicationModel model, IProgressMonitor monitor) {
		ApplicationProjectCreator creator = new ApplicationProjectCreator();
		creator.createApplicationProject(model, monitor);
	}
}
